﻿Public Class F99
    Private Sub btnguardar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnguardar.Click
        If (Len(txtnumform.Text) = 0) Then
            MsgBox("EL Número de formulario es un campo obligatorio", MsgBoxStyle.Exclamation)
            txtnumform.Focus()
            Exit Sub
        End If
        Dim oF99Negocios As New Negocios.NF99
        Dim oF99 As New Entidades.EF99
        oF99.numformu = UCase(txtnumform.Text)
        oF99.tiposolicitudd = UCase(txttiposolicitud.Text)
        oF99.controll = UCase(txtcontrol.Text)
        oF99.apellidoo = UCase(txtapellido.Text)
        oF99.nombree = UCase(txtnombre.Text)
        oF99.tiponumdocc = UCase(txttiponumdoc.Text)
        oF99.observacioness = UCase(txtobservaciones.Text)
        oF99.lugarr = UCase(txtlugar.Text)
        Try
            If oF99Negocios.guardarF99(oF99) Then
                MsgBox("La carga ha sido exitosa", MsgBoxStyle.MsgBoxSetForeground, "Información")
            End If
        Catch ex As Exception
            MsgBox("Carga fallida. " + ex.Message, MsgBoxStyle.MsgBoxSetForeground, "Información")
        End Try
    End Sub
    Private Sub btnEditarAnverso_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnEditarAnverso.Click
        If (Len(txtnumform.Text) = 0) Then
            MsgBox("EL Número de formulario es un campo obligatorio", MsgBoxStyle.Exclamation)
            txtnumform.Focus()
            Exit Sub
        End If
        Dim oF99Negocios As New Negocios.NF99
        Dim oF99 As New Entidades.EF99
        oF99.numformu = UCase(txtnumform.Text)
        oF99.tiposolicitudd = UCase(txttiposolicitud.Text)
        oF99.controll = UCase(txtcontrol.Text)
        oF99.apellidoo = UCase(txtapellido.Text)
        oF99.nombree = UCase(txtnombre.Text)
        oF99.tiponumdocc = UCase(txttiponumdoc.Text)
        oF99.observacioness = UCase(txtobservaciones.Text)
        oF99.lugarr = UCase(txtlugar.Text)
        Try
            If oF99Negocios.editarF99(oF99) Then
                MsgBox("La edición ha sido exitosa", MsgBoxStyle.MsgBoxSetForeground, "Información")
            End If
        Catch ex As Exception
            MsgBox("Edición fallida. " + ex.Message, MsgBoxStyle.MsgBoxSetForeground, "Información")
        End Try
    End Sub
    Private Sub btnNuevo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNuevo.Click
        txtnumform.Text = ""
        txttiposolicitud.Text = ""
        txtcontrol.Text = ""
        txtapellido.Text = ""
        txtnombre.Text = ""
        txttiponumdoc.Text = ""
        txtobservaciones.Text = ""
        txtlugar.Text = ""
    End Sub
    Private Sub btnsalir_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnsalir.Click
        Me.Close()
    End Sub

    Private Sub btnF01V_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnF01V.Click
        F01_V_anverso_.Show()
        Me.Close()
    End Sub

    Private Sub btnF01M_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnF01M.Click
        F01_M_anverso_.Show()
        Me.Close()
    End Sub

    Private Sub btnF01I_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnF01I.Click
        F01_VImp_anverso_.Show()
        Me.Close()
    End Sub

    Private Sub btnF02V_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnF02V.Click
        F02_V_anverso_.Show()
        Me.Close()
    End Sub

    Private Sub btnF02M_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnF02M.Click
        F02_M_anverso_.Show()
        Me.Close()
    End Sub

    Private Sub btnF04V_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnF04V.Click
        F04_V_anverso_.Show()
        Me.Close()
    End Sub

    Private Sub btn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn.Click
        F04_M_anverso_.Show()
        Me.Close()
    End Sub

    Private Sub btnF08V_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnF08V.Click
        F08_V_anverso_.Show()
        Me.Close()
    End Sub

    Private Sub btnF08M_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnF08M.Click
        F08_M_anverso_.Show()
        Me.Close()
    End Sub

    Private Sub btnF11V_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnF11V.Click
        F11_V_anverso_.Show()
        Me.Close()

    End Sub

    Private Sub btnF11M_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnF11M.Click
        F11_M_anverso_.Show()
        Me.Close()

    End Sub

    Private Sub btnF12V_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnF12V.Click
        F12_V.Show()
        Me.Close()
    End Sub

    Private Sub btnF12M_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnF12M.Click
        F12_M.Show()
        Me.Close()
    End Sub


    Private Sub btnF59M_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnF59M.Click
        F59_M.Show()
        Me.Close()
    End Sub

    Private Sub btnFR00_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnFR00.Click
        F_R00.Show()
        Me.Close()
    End Sub


    Private Sub btnReverso_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnReverso.Click
        MsgBox("El presente formulario no posee lado Reverso", MsgBoxStyle.DefaultButton1, Title:="INFORMACIÓN")
    End Sub
End Class
